<h1 class="heading">Sistema list List</h1>

<?php
	include_component(
    	'socepmi',
    	'filtro',
		array(
        	'filter' => $filter,
        	'form' => new SistemaForm()
		)
	);
?>

<br />

<?php if (count($sistema_list)): ?>
<table class="paginacao" cellpadding="2" cellspacing="0" width="100%" align="center">
	<tr>
		<td align="left"><?php $pager_layout->displayResultados(); ?></td>
		<td align="right"><?php $pager_layout->display(); ?></td>
	</tr>
</table>
<?php endif; ?>

<table class="list">
  <thead>
    <tr>
      <th>Id sistema</th>
      <th>Nm sistema</th>
      <th>Id sistema pai</th>
      <th>Ds sobre</th>
      <th>Ds endereco</th>
      <th>Ds servico</th>
      <th>Ds twitter</th>
      <th>Ds facebook</th>
      <th>Ds you tube</th>
      <th>Ds orkut</th>
      <th>Ds flickr</th>
      <th>Ds maps</th>
    </tr>
  </thead>
  <tbody>
    <?php if (!count($sistema_list)): ?>
	<tr>
		<td align="center" colspan="12">NENHUM REGISTRO ENCONTRADO!</td>
	</tr>
	<?php endif; ?>
	<?php $i = 0; ?>
    <?php foreach ($sistema_list as $sistema): ?>
    <?php $bg = ($i++ % 2 == 0)? 'row0' : 'row1'; ?>
    <tr class="<?php echo $bg; ?>">
      <td><a href="<?php echo url_for('socepmi/edit?id_sistema='.$sistema['id_sistema']) ?>"><?php echo $sistema['id_sistema'] ?></a></td>
      <td><?php echo $sistema['nm_sistema'] ?></td>
      <td><?php echo $sistema['id_sistema_pai'] ?></td>
      <td><?php echo $sistema['ds_sobre'] ?></td>
      <td><?php echo $sistema['ds_endereco'] ?></td>
      <td><?php echo $sistema['ds_servico'] ?></td>
      <td><?php echo $sistema['ds_twitter'] ?></td>
      <td><?php echo $sistema['ds_facebook'] ?></td>
      <td><?php echo $sistema['ds_you_tube'] ?></td>
      <td><?php echo $sistema['ds_orkut'] ?></td>
      <td><?php echo $sistema['ds_flickr'] ?></td>
      <td><?php echo $sistema['ds_maps'] ?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

<?php 
	comandos_form(
		null,
				link_to(
			':: Inserir ::',
			'socepmi/new',
			array('class' => 'botao')
		)
			)
?>